<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css"/>
    <style>
        .flex{display: -webkit-box; display: -webkit-flex; display: flex;}
        html,body{
            background-color: transparent;
        }
    </style>
</head>
<body>

</body>
</html>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/common/common.js"></script>
<script type="text/javascript">
    var youZan2, shop_url;
    apiready = function () {
        youZan2 = api.require('youZan2');
        shop_url = "https://h5.youzan.com/v2/common/error/closed?kdt_id=42973600";
        if(api.systemType=="ios"){
            shop_url = "https://h5.youzan.com/v2/common/error/closed?kdt_id=42973600";
        }
    }

    function openYouZan() {
        youZan2.openWin({
            url: shop_url ,
            open_user_id: "test",
            kdt_id: "42973600"
        }, function(ret){
            //alert(JSON.stringify(ret));  //不要用这句话，这句话会打断执行。
            console.log(JSON.stringify(ret));
        });
    }
</script>
